export const regFenToYuan=(fen)=>{
	try{
		var num = fen;
		if(num === null || num==='null'){
			return '-'
		}
		fen = fen || 0
		num=fen*0.01;
		num+='';
		var reg = num.indexOf('.') >-1 ? /(\d{1,3})(?=(?:\d{3})+\.)/g : /(\d{1,3})(?=(?:\d{3})+$)/g;
		num=num.replace(reg,'$1');
		num = (+num).toFixed(2)
		return num
	}catch(e){
		return '-'
	}
}

export const toFixedF=(num)=>{
	// console.log(num,'这是值toFixedF')
	try{
		if(num === null || num==='null'){
			return '-'
		}
		num = num.toFixed(2)
		return num
	}catch(e){
		return '-'
	}
}

export default {
	regFenToYuan,
	toFixedF
}